#!/usr/bin/env python
# encoding: utf-8

import os,sys
f = open('./1.txt').readlines()
for i in f:
    f1 = i.split('?')[0]
    f2=i.split('?')[1]
    if '-' in f2:
        a1 = f2.split('-')[0]
        a2 = f2.split('-')[1]
        for i in range(int(a1),int(a2)+1):
            print f1 +'   '+ str(i)

    else:
        print f1 +'   '+f2
